<div class="form-group col-sm-3">

    <!-- Id Field -->
<div class="form-group">
    {!! Form::label('name', '分类:') !!}
    <p>{!! $categoryStatistics->category->name !!}</p>
</div>

<!-- Date Field -->
<div class="form-group">
    {!! Form::label('date', '日期:') !!}
    <p>{!! $categoryStatistics->date !!}</p>
</div>

<!-- Type Field -->
<div class="form-group">
    {!! Form::label('type', '类型:') !!}
    <p>
        @if ($categoryStatistics->type == 1)
            天统计
        @elseif ($categoryStatistics->type == 2)
            周统计
        @elseif ($categoryStatistics->type == 3)
            月统计
        @elseif ($categoryStatistics->type == 4)
            季统计
        @elseif ($categoryStatistics->type == 5)
            年统计
        @elseif ($statistics->type == 6)
            全统计
        @endif
    </p>

</div>

<!-- Goods Count Field -->
<div class="form-group">
    {!! Form::label('goods_count', '商品数量:') !!}
    <p>{!! $categoryStatistics->goods_count !!}</p>
</div>

<!-- Goods Amount Field -->
<div class="form-group">
    {!! Form::label('goods_amount', '商品金额:') !!}
    <p>{!! $categoryStatistics->goods_amount !!}</p>
</div>

<!-- Goods Return Count Field -->
<div class="form-group">
    {!! Form::label('goods_return_count', '商品退货数量:') !!}
    <p>{!! $categoryStatistics->goods_return_count !!}</p>
</div>

<!-- Goods Return Amount Field -->
<div class="form-group">
    {!! Form::label('goods_return_amount', '商品退货金额:') !!}
    <p>{!! $categoryStatistics->goods_return_amount !!}</p>
</div>

<!-- Goods Return Rate Field -->
<div class="form-group">
    {!! Form::label('goods_return_rate', '商品退货率:') !!}
    <p>{!! $categoryStatistics->goods_return_rate !!}</p>
</div>

{{--<!-- Json Field -->--}}
{{--<div class="form-group">--}}
    {{--{!! Form::label('json', 'Json:') !!}--}}
    {{--<p>{!! $categoryStatistics->json !!}</p>--}}
{{--</div>--}}

<!-- Created At Field -->
<div class="form-group">
    {!! Form::label('created_at', 'Created At:') !!}
    <p>{!! $categoryStatistics->created_at !!}</p>
</div>

<!-- Updated At Field -->
<div class="form-group">
    {!! Form::label('updated_at', 'Updated At:') !!}
    <p>{!! $categoryStatistics->updated_at !!}</p>
</div>

</div>

<div class="form-group col-sm-9" style="background: mintcream">
    <div class="box-body">
        <table class="table table-responsive" id="statistics-table">
            <thead>
            <th>商品名</th>
            <th>属性名</th>
            <th>价格</th>
            <th>数量</th>
            <th>退款数量</th>
            </thead>
            <tbody>
            @foreach($categoryStatistics->info['goods_rank'] as $v)
                <tr>
                    <td>{{ $goods_arr[$v['goods_id']]->name }}</td>
                    <td>{{ $v['attribute_id']?$attribute_arr[$v['attribute_id']]->name:'' }}</td>
                    <td>{!! $v['price'] !!}</td>
                    <td>{!! $v['number'] !!}</td>
                    @if($v['return_number']>0)
                        <td><span style="color: red">{!! $v['return_number'] !!}</span></td>
                        @else
                        <td>{!! $v['return_number'] !!}</td>
                    @endif
                </tr>
            @endforeach
            </tbody>
        </table>
    </div>
</div>